#/usr/bin/env python3.6
# -*- encoding: utf-8 -*-
"""
@File    : __init__.py.py
@Time    : 2020/2/2 0002 11:03
@Author  : zhangbing
@Email   : 18829172841@163.com
@Software: PyCharm
"""
from  flask  import  Flask
from  .views   import  view_init
from .config import  envs
from .ext import  create_ext
def create_app(env):
    app=Flask(__name__,template_folder='../template',static_folder='../static')
    app.config.from_object(envs.get(env))
    view_init(app=app)
    create_ext(app=app)
    return  app